home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Taifun / Taifun 003 (1987-02-15)(Ossowski, Stefan)(DE)(PD).zip / Taifun 003 (1987-02-15)(Ossowski, Stefan)(DE)(PD).adf / MCad / mCAD.doc < prev    next >
Text File  |  1987-03-04  |  24KB  |  514 lines

  1.    mCAD Version 1.2.4    4/25/87
  2.  
  3.    by
  4.       Tim Mooney
  5.       120 Purefoy Rd.
  6.       Chapel Hill, NC 27514
  7.  
  8. ---------------------------------------------------------------------------
  9.    mCAD is SHAREWARE.  This means that you are free to play around with mCAD
  10. for as long as it takes you to decide whether or not you are willing to pay
  11. for it.  It also means that you are also free to decide what price you are
  12. willing to pay.  Finally, it is possible for you to use mCAD and pay nothing,
  13. although this violates the moral contract between you and me that you enter
  14. by reading this message.
  15.  
  16.    If you send me $20 or more, you will become a registered user.  I'll be
  17. grateful for your support and I will:
  18.  
  19. 1) Send you notice of new versions as I write them.
  20.  
  21. 2) Allow you personal use of the source code.
  22.  
  23. 3) Support your use by answering questions and considering your requests for
  24. improvements to mCAD.  Since some requests are more difficult than others to
  25. satisfy, and since some improvements may be impossible to implement without
  26. adversely affecting mCAD's performance in other respects, I can promise
  27. nothing more than serious consideration.
  28.  
  29. 4) Send you the latest versions of public domain software that I either
  30. wrote or am maintaining.  Currently, the list includes:
  31.  
  32.    mp          - a 2-D data plotting routine which can extract data by
  33.                  "column" from a text file.
  34.  
  35.    tdp         - a 3-D data plotting routine with hidden line removal.
  36.  
  37.    vt640       - a tektronix 4010 emulator that is derived from "TEK4010"
  38.                  and the latest version of "VT100" available to me.
  39.  
  40.    long.font   - an 8 X 16 font that works well with interlaced screens and
  41.                  with my favorite (customized) version of MicroEmacs.
  42.  
  43.    d           - a directory listing program (five-up, sorted, with sub-
  44.                  directories in an alternate color) derived from the public
  45.                  domain program "ld".
  46.  
  47.    Whatever you decide to do, you will not be paying for marketing,
  48. promotion, or copy-protection.
  49.  
  50.    Final note: if you want me to send you the latest version of mCAD,
  51. source code, or anything else on disk, please send either a blank disk
  52. or an additional $5. 
  53. ---------------------------------------------------------------------------
  54.  
  55.    mCAD is an object-oriented drawing program.  It has a small set of
  56. graphics primitives (like "line", "box", and "text") and a small set of
  57. editing functions (like "move", "size", and "rotate").  While drawing and
  58. editing, the user can call on other functions to modify the display -- to
  59. zoom in, slide around, superimpose a grid, etc. 
  60.  
  61.    The one powerful feature of mCAD is that primitives can be grouped and
  62. ungrouped; the editing functions operate on groups of (one or more)
  63. primitives.  In these instructions, "group" and "object" will mean either a
  64. single primitive or a group of primitives.
  65.  
  66.    Most (surely all!) Amiga users know how to use the mouse to draw pictures. 
  67. In mCAD, the mouse does mostly what you're accustomed to from programs like
  68. GraphiCraft.  There are three differences:
  69.  
  70.    1) In mCAD, you are called on to SELECT objects for treatment with one of
  71. the editing tools.  Since mCAD can't know for which of two or more
  72. overlapping objects your SELECT click was intended, it runs through a list of
  73. all the possibilities, highlighting each in turn.  In this context, the MENU
  74. button means "No, not that one", the SELECT button means "Yes, the
  75. highlighted object is the one I want". 
  76.  
  77.    2) While drawing a primitive (exception: text) or editing a group
  78. (exceptions: coloring, setting line type), mCAD gives you a chance to abort
  79. the whole operation.  In this context, the MENU button means "Abort", the
  80. SELECT button means "The highlighted object is drawn as I want it, make it
  81. permanent."
  82.  
  83.    3) Certain editing functions, "Size" for example, require additional
  84. information and indicate this by drawing a highlighted object.  You are asked
  85. to click on (SELECT button) e. g., one corner of a box. 
  86.  
  87.    So, generally, when the mouse buttons don't have their Intuition meanings,
  88. the SELECT button means "Yes/ok/do it...", and the MENU button means
  89. "No/abort/get me out of this".  This follows the accepted Amiga convention
  90. that "left" breaks new ground while "right" is conservative and safe.  If you
  91. get lost in -- or called away in the middle of -- a sequence of mouse clicks,
  92. a couple of MENU button clicks will get you out of it. 
  93.  
  94.  
  95. *********************************************************************
  96. FILES:
  97.    mCAD wants the files mCAD.txt and mCAD.rgb to be in your default
  98. directory.  If mCAD.txt doesn't exist, text will not work.  If mCAD.rgb
  99. doesn't exist, default colors will be used.
  100.    mCAD expects the default directory to contain a subdirectory named
  101. "part".  If this subdirectory doesn't exist, mCAD may think you have the
  102. wrong disk, and you may have to type in the name of the directory you
  103. are using to save parts in.
  104.  
  105. *********************************************************************
  106. THE COMMAND LINE:  to call up the program
  107. *****************
  108.  
  109. mCAD ?         Help
  110. mCAD filename  Create/Edit a drawing named "filename".  (You need not type
  111.                the filename if you intend to load the file from within mCAD.)
  112.  
  113.  
  114. *********************************************************************
  115. THE MENU:   menu items that don't work or aren't yet implemented are
  116. described by "*"
  117. *********
  118.  
  119. *************
  120. PROJECT
  121.  
  122. New         Erases the current drawing.
  123.  
  124. Open        Opens a drawing which exists on disk for viewing and/or editing.
  125.             MicroSmith's file requester is used to specify the file name.
  126.  
  127. Save        Saves the drawing to disk using the current drawing name.  The
  128.             current drawing name is either the name that occurred on the
  129.             command line, or the name of the file most recently "Open"ed.
  130.             The default drawing name is "mCAD.out".
  131.  
  132. SaveAS      Saves the drawing to disk.  MicroSmith's file requester is used
  133.             to specify the file name.
  134.  
  135. Plot        Saves the (entire) drawing as a plot file in the Hewlett Packard
  136.             Graphics Language.  Instructions are included in the file to
  137.             enable XON/XOFF handshaking with the plotter.  To actually make
  138.             the plot, copy the plot file to SER: The plot file name has the
  139.             same root as the current drawing name, and the extension ".plt"
  140.  
  141. ..1 Pen     Similar to "Plot", except that a separate file is made for each
  142.             of the 16 colors.  The files are named as for "Plot", but a hex
  143.             number (0..f) is tacked onto the end to indicate the pen color.
  144.             The file whose extension is ".plt0" is special;  it contains the
  145.             plotter initialization and MUST be sent to the plotter first.
  146.             The pen number used in all files is 1.  See "Hints..." below for
  147.             more information on this item.
  148.  
  149. Quit        Quits mCAD.  If you have made any changes to the current drawing,
  150.             you will be asked if you want to save it.
  151.  
  152. About       Toggles display of the screen title bar.
  153.  
  154.  
  155. *************
  156. PART
  157. mCAD expects the current directory to contain a sub-directory called "part".
  158. MicroSmith's file requester will let you change directories, however.  If
  159. the sub-directory "part" is not found, the file requester will say
  160. "Wrong disk?".  
  161.  
  162. Open        Includes an mCAD drawing, which was previously saved to disk, in
  163.             the current drawing.  You will use MicroSmith's file requester to
  164.             specify the part name.
  165.  
  166. Save        Saves a group to disk using the current part name.  Select the
  167.             group you want to save with the mouse as described above.
  168.  
  169. SaveAs      Saves a group to disk by name.  When you've selected the group
  170.             to be saved, MicroSmith's file requester will display itself
  171.             and accept the file name.
  172.  
  173. Group       Groups objects together for treatment with an editing tool or to
  174.             be saved as a "part".  Draw a box completely enclosing the
  175.             objects you want treated as a group.  An object can be in only
  176.             one group at a time;  if an enclosed object is already part of a
  177.             group, the entire group will merge into the new group. 
  178.  
  179. UnGroup     Select a group by clicking on any of its members.  On the
  180.             confirming SELECT click, the group will be dismembered.
  181.  
  182.  
  183. *************
  184. OPTIONS
  185.  
  186. Replot      Redraws the screen.
  187.  
  188. Zoom        1)  Draw a box around the region you want to see up close.  mCAD
  189.             will zoom in to the biggest region consistent with both the box
  190.             you drew and the aspect ratio of the drawing.  Note: in this
  191.             version the aspect ratio cannot be changed by any command.
  192.             2)  Click twice in the same spot.  mCAD will zoom out by a
  193.             factor of two.
  194.  
  195. Slide       Draw a line.  On your second SELECT click mCAD redraws the
  196.             picture as if your first click had grabbed a hold of the page. 
  197.  
  198. FullPlot    Zooms out to show the whole drawing.
  199.  
  200. Axes        This is a toggle switch that puts axes on the display.  Setting
  201.             this switch does NOT cause the screen to be redrawn.
  202.  
  203. Grid        This is a toggle switch that puts a grid over the display.
  204.             Setting this switch does NOT cause the screen to be redrawn.
  205.  
  206. X-Hair      This is a toggle switch.  The mouse pointer is replaced by a
  207.             crosshair.  (Notice what happens when you press the MENU button
  208.             and move the mouse.)            
  209.  
  210. GridSnap    This is a toggle switch.  Primitives (exceptions: text, circle,
  211.             arc) drawn with GridSnap enabled will snap to the grid on your
  212.             *final* SELECT click.  When enabled, menu item reads "GRIDSNAP". 
  213.  
  214. DataSnap    This is a toggle switch.  Primitives (exceptions: text, circle,
  215.             arc) drawn with DataSnap enabled will snap to previously drawn
  216.             objects (if they are close enough) on your final SELECT click.
  217.             Points are more "attractive" than lines connecting those points.
  218.             When enabled, menu item reads "DATASNAP"
  219.  
  220. nTics*2     Increases the density of tics / grid lines.  A maximum is
  221.             enforced.  Selecting this item causes the screen to be redrawn
  222.  
  223. nTics/2     Decreases the density of tics / grid lines.  A minimum is
  224.             enforced.  Setting this item causes the screen to be redrawn
  225.  
  226. ShowXY      Calls up a numeric readout in the current plot color of the
  227.             pointer position.  The readout is in USER coordinates (the
  228.             numbers which are drawn when you select "Axes" are in USER
  229.             coordinates.) The readout consists of the absolute X
  230.             (horizontal) and Y coordinates and the distances from the
  231.             location of the most recent SELECT click.
  232.  
  233.  
  234. *************
  235. DRAW
  236.  
  237. Line        Draw a sequence of (one or more) connected lines.  Click twice
  238.             on your final point. 
  239.  
  240. Box         Draw a box by clicking on two corners.
  241.  
  242. Circle      Draw a circle by clicking on the center position, moving the
  243.             mouse to change the size, and clicking again when the size is
  244.             right. 
  245.  
  246. Arc         Draw an arc with three mouse clicks: the first click sets the
  247.             center;  the second click sets the radius and starting angle;
  248.             the third click sets the ending angle. 
  249.  
  250. Measure     *
  251.  
  252. Clone       Select a group by clicking on any of its members.  A duplicate
  253.             will follow the mouse pointer until you press either the MENU
  254.             button ("abort") or the SELECT button. 
  255.  
  256. TextSize    Draw a box indicating the size/aspect of the letters you plan
  257.             to type onto the screen.
  258.  
  259. Cursor      SELECT the location of the text cursor.
  260.  
  261.  
  262. *************
  263. EDIT
  264. In every case, you first select a group for treatment.
  265.  
  266. Erase       SELECT a highlighted group to erase it.
  267.  
  268. Size        SELECT a highlighted group.  mCAD draws the smallest enclosing
  269.             rectangle (possibly a line).  You SELECT a corner of the
  270.             rectangle to begin sizing.  The group is scaled as the mouse
  271.             moves.  Press the SELECT button, when you like what you see, or
  272.             the MENU button to abort. 
  273.  
  274. Move        Select a group by clicking on any of its members.  The group
  275.             will follow the mouse pointer until you press either the MENU
  276.             button ("abort") or the SELECT button. 
  277.  
  278. Rotate      The selected object is rotated about its "center".  Vary the
  279.             angle by moving the mouse and click SELECT to finish or MENU to
  280.             abort. 
  281.  
  282. Rot +90     The selected object will be rotated counter- clockwise by 90
  283.             degrees.
  284.  
  285. Rot -90     The selected object will be rotated clockwise by 90 degrees.
  286.  
  287. Point       Select a group.  While the group you want to modify is
  288.             highlighted, click on the point you would like to move.  The
  289.             point and lines connecting it to adjacent points will follow
  290.             the mouse.  Click SELECT to finish or MENU to abort.
  291.  
  292. Color       Select a group.  The selected group immediately turns to the
  293.             current plot color.  (No chance for abort here.)
  294.  
  295. SetLType    Select a group.  The selected group will be re-rendered in the
  296.             current line type.  (No chance for abort here.)
  297.  
  298.  
  299. *************
  300. COLORS
  301.  
  302. color boxes    Your menu selection becomes the current plot color.
  303.                Initially, the current color is #4 (first box in second row
  304.                of the palette).
  305.  
  306. Modify Colors  Call up Microsmith's Palette tool (a very nice tool written
  307.                by Charlie Heath).
  308.  
  309. Save Colors    Save current colors to the file "mCAD.rgb" which is read by
  310.                mCAD on startup. 
  311.  
  312.  
  313. *************
  314. LINETYPE
  315. Line types are represented pixel-by-pixel using asterisks. (Pretty crude, huh?)
  316. Your menu selection becomes the current line type.  Text is rendered in solid
  317. lines regardless of the current line type, but you can use the editing
  318. function "SetLType" on text as well as any other primitive.
  319.  
  320. ************************************************************************
  321.  
  322. NEW FEATURES
  323.  
  324. Version 1.2.4
  325.    A selection of line types has been added.  These are designed to
  326. approximate the line types available in HPGL.
  327.    Text defaults work.
  328.    mCAD now "picks up" the cross-hair/point before drawing and puts it back
  329. down after.  No more litter on the screen.
  330.  
  331. Version 1.2.3
  332.    Screen scaling is completely redone.  mCAD now uses the entire screen
  333. instead of reserving space for axes.  When axes (which also have been redone)
  334. are selected, they are just plopped on top of the drawing.
  335.    Plot scaling has been modified so that no coordinates larger than 10000
  336. are generated.
  337.  
  338. Version 1.2.2
  339.  
  340.    File input and output from within mCAD has been added.  Thanks to Charlie
  341. Heath and MicroSmith's for the file requester and, while I'm at it, for their
  342. palette tool.  This is the hard stuff, folks.  If I had had to write these
  343. tools myself, you can be sure that they wouldn't be such a pleasure to use,
  344. and that I would be asking for more of a donation than $20.
  345.  
  346.    Point editing has been added.  This feature allows you to move a single
  347. point of a group without affecting other points.
  348.  
  349.    A shortcut for rotating by 90 degrees has been added.  (The original
  350. motive for this was to rotate entire drawings before plotting.)
  351.  
  352.    Several bugs that once caused mCAD to crash have been fixed.  mCAD now
  353. realizes that mouse clicks are being queued up "behind its back" and that
  354. disabling them doesn't erase queued messages.
  355.  
  356.    Groups work right.  In previous versions, the result of grouping objects
  357. that were already in different groups depended on the order in which those
  358. groups had been formed.  (See "HINTS..." for the full story.)
  359.  
  360.    mCAD can now read a file and add the objects in that file to its linked
  361. list of objects.  In other words, the "Parts" menu is fully implemented.  It
  362. may be useful to know that there is no difference, to mCAD, between a "part"
  363. file and a "cad" file.  You can treat a whole drawing as a part and
  364. vice-versa.  You can also use the outputs of the programs "mp" and "tdp" as
  365. either parts or drawings. 
  366.  
  367.    Tab, backspace, and carriage return now do more nearly what one would
  368. expect.  Backspace does not erase, however.  Also, see "BUGS...".
  369. ************************************************************************
  370.  
  371. HINTS, SUGGESTIONS ...
  372.  
  373. 1)   mCAD's input file format is very simple.  You can make an mCAD file by
  374. hand or with a simple program in "c", Basic, etc.  In fact, this file can
  375. be used as input to mCAD.  The only lines mCAD will pay attention to are
  376. the following:
  377.  
  378. 100 100     This is a box..
  379. 100 200     Note: if you use this file as input to mCAD, DO NOT SAVE!
  380. 200 200     mCAD will cheerfully erase this file, leaving in its place
  381. 200 100     a file consisting only of the numbers to the left.
  382. 100 100
  383. *>          The object above this mark is in a group with the object below it.
  384. *C 4        This object is in color 4
  385. *L 2        This object is to be rendered in line type 2
  386.  
  387. 125 150     This is a line..
  388. 175 150
  389. *C 5  
  390.  
  391.       --------------------------
  392.  
  393. 2)   I prefer a "fast" mouse for most programs, but would like a slower one
  394. for doing fine work with mCAD.  I haven't implemented a mechanism for
  395. changing the mouse speed while in the program, but an acceptable substitute
  396. is using the Amiga-arrow keys.  You may have forgotten about this keyboard
  397. alternative since it is so rarely useful.  Also, don't forget about Amiga-alt
  398. for mouse buttons.  (Sometimes, I inadvertently move the mouse while clicking
  399. a mouse button.)
  400.  
  401. 3)   Grouping objects:
  402.    Since the only way to indicate which objects you want in your group is to
  403. draw an enclosing rectangle, you may be having trouble getting just the
  404. objects you want.  You don't have to enclose all the desired objects at once,
  405. however.  Two or more rectangles can be used.  If you group objects which
  406. already are parts of separate groups, the groups will be merged. 
  407.  
  408. 4)   When X-Hair is not selected, the Intuition pointer is supplemented with a
  409. dot at the current location of the graphics cursor.  (You may know that the
  410. Intuition pointer is implemented in low resolution and therefore cannot, with
  411. precision, select a point on a high resolution screen.  The dot is a remedy
  412. for this.)  To make effective use of the dot -- indeed, too SEE it -- your
  413. pointer should have its "hot spot" on one of the "transparent" pixels.  In
  414. Preferences, use the "Set Point" option while you "Edit Pointer". 
  415.  
  416. 5)   To keep a constant text size in your drawing through many edits, or from
  417. drawing to drawing, you might consider making a box of the desired text
  418. size and saving it as a part called "textsize".  When you want to set your
  419. text size, then: open the "textsize" part;  select "TextSize" from the
  420. "Draw" menu; and draw a box exactly like the "textsize" box.
  421.  
  422. 6)   If your drawing has more colors than your plotter has pens, you will
  423. probably want to use the "Project" menu item "..1 Pen" to write your plotter
  424. files.  mCAD will make 16 files, one for each color, which you can send
  425. separately to the plotter -- manually changing pens between sends.  The
  426. file "sendplt" is an "Execute" script to take the drudgery out of this
  427. procedure.  An example:
  428.  
  429.    I've made, say, a drawing named "mypic.cad" and used "..1 Pen" to make the
  430.    files "mypic.plt0", "mypic.plt1", ... "mypic.pltF";  I'm connected via the
  431.    serial port to a plotter, and have loaded a pen I think of as "pen 0" in
  432.    what that plotter considers the "pen 1" slot;  I can now use the Amiga
  433.    "Execute" command like so:
  434.       "Execute sendplt mypic"
  435.    When this file reports:
  436.       "sending mypic.plt0"
  437.    I hit the space bar (or any key) and wait until the plotter has finished
  438.    drawing.  (Since I've typed into the CLI window, the Amiga politely waits
  439.    until I either erase what I've typed, or hit <return>, before continuing
  440.    to execute "sendplt" -- because what sendplt wants to do next is write to
  441.    that same CLI window.)  I now change pens and hit <backspace>, whereupon
  442.    sendplt continues to execute and says:
  443.       "sending mypic.plt1"
  444.    I repeat the (hit key; wait; swap pen; hit <backspace>) procedure until
  445.    the drawing is complete.
  446.  
  447. 7)   Those of you who are interested in writing plotter drivers or other
  448. software for converting mCAD output for use with other that HPGL plotters,
  449. please note:
  450.    I haven't been concerned in the past with providing a stable format in
  451. the .plt file for your efforts.  This means that a positional translation of
  452. a .plt file is likely to be useable only with the output of the mCAD version
  453. for which it was designed.  If this is a problem, tell me.  Maybe we can
  454. work something out.  Let me also suggest an alternative:
  455.    The mCAD input file (the .cad file) is likely to be more stable -- else
  456. one version of mCAD couldn't read the file saved by another.  Also, the .cad
  457. file is MUCH easier to parse than the .plt file.  In fact, a routine which
  458. parses it is available to you in getdat().  The only problem here is that
  459. there is no scaling information up-front; you have to read the whole file to
  460. find the limits of the data.  If there is sufficient interest, I could
  461. provide that scaling information up-front in what mCAD would normally
  462. consider "comments".  (I'm not going to GUARANTEE the stability of either
  463. file just yet, though.  mCAD takes too long to read and save files for my
  464. taste and if a different format would make a big difference, I'll change it
  465. and send you a translator.)
  466.    A third solution would be for someone (possibly me) to write a proto-
  467. driver routine which parses a .cad file and calls plotter specific driver
  468. routines.  In this scenario, someone (possibly you) would write routines
  469. with names like: InitPlotter(), SetPenColor(), PenUp(), Scale(), etc, and
  470. link these with the proto-driver to make a program that plots directly from
  471. a .cad file.  (This is similar to the way the Amiga handles printers.)  I
  472. haven't really given this much thought, but I suspect that some of you folks
  473. have.  If you're interested, let me know what you think.
  474. ************************************************************************
  475.  
  476. BUGS, WARNINGS, ADDITIONAL NOTES ...
  477.  
  478.    Letters, in this version, are REALLY primitives; all points are connected
  479. together as though drawn with a single "Line" command.  This means characters
  480. like [ ! = ? : ; " Q ] don't look so good.  (Ok, they look awful!).  Text is
  481. likely to improve in some future version. 
  482.  
  483.    mCAD doesn't do ANY memory checking.  It will crash the system or exit
  484. without returning allocated memory if it finds that there isn't enough memory
  485. to do whatever it wants to do.  In a multi-tasking system with a ram disk,
  486. this is bound to happen to you sooner or later.  This IS going to be fixed!
  487. Until it is fixed, I suggest you save your drawing often and keep an eye on
  488. the amount of ram available.
  489.  
  490.    If you select "Open" or "SaveAs" and nothing happens, you may be short
  491. on memory.  MicroSmith's file requester may not be able to allocate enough
  492. memory to display itself.  mCAD will have no idea what has happened, however.
  493. It receives the same message as it would if you had selected the requester's
  494. "Cancel" gadget.  The only way to save under this circumstance is to select
  495. "Save" from the Project menu.  (If you select "SaveAs" from the "Part" menu,
  496. remember that nothing will happen in any case until you select the object to
  497. be saved.)
  498. ************************************************************************
  499. ETC.
  500.  
  501.    If you have a modem and are so inclined, you can leave me mail at the
  502.    following bulletin board which I monitor regularly.
  503.       "Deep Thought"   (919) 471-6436
  504.  
  505.    Registered users:
  506.  
  507.    I plan to move sometime in the fall of '87.  When I do, I'll leave a
  508. forwarding address on the bulletin board mentioned above and with:
  509.  
  510.    Department of Physics and Astronomy
  511.    Phillips Hall
  512.    University of North Carolina
  513.    Chapel Hill, NC  27514
  514.